<template>
	<view class="bg">
		<water-mask></water-mask>
		<!-- 批次卡片列表 -->
		<view class="card-list" >
			
			<pici-card v-for="(item,index) in batchList" :time="item.pmsBatch.timeLimitEnd"  @click.native="clickComponentA(item)"  :name="item.pmsBatch.name"></pici-card>
			
		</view>
	</view>
</template>

<script>
	import {
		getCategoryList,
		getBatchListAll
	} from '@/api/system/category.js'
	export default {
		onLoad() {
			getBatchListAll().then(resq => {
				this.batchList = resq.data
			})
		},
		data() {
			return {
				batchList: []
			};
		},
		methods:{
			clickComponentA(item){
				uni.navigateTo({
					url:"/pages/category/category?piID="+item.pmsBatch.batchId
				})
			},
			toDetail(item){
				
			},
		}
	}
</script>

<style lang="scss">
	.bg{
		display: flex;
		justify-content: center;
		align-items: center;
		
	}
	.card-list {
		width: 85%;
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		align-items: center;

	}
</style>